package com.iris.live.services.data.repositories;

import com.iris.live.services.data.models.Lsh保险手续费Model;
import com.iris.live.services.data.models.Lsh保险手续费ModelPK;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * Created by sxy on 2016/7/11.
 */
public interface Lsh保险手续费Repository extends JpaRepository<Lsh保险手续费Model, Lsh保险手续费ModelPK>, JpaSpecificationExecutor<Lsh保险手续费Model> {
    @Modifying
    @Query("delete from Lsh保险手续费Model a where a.保险公司编号=?1 and a.许可=?2 and a.客户类别=?3 ")
    void deleteInsuranceFee(Integer InsuranceFeeID ,String permit ,String custType);

    @Query("SELECT a FROM Lsh保险手续费Model a WHERE a.保险公司编号=?1 and a.许可=?2 AND a.客户类别 =?3  ")
    Lsh保险手续费Model finCharge(Integer InsuranceFeeID,String permit,String custType);
}
